USE [influenza]
GO

/****** Object:  StoredProcedure [dbo].[SP_cmbEstudio]    Script Date: 01/18/2010 13:42:58 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[SP_cmbEstudio]
@param varchar(3)
as
Begin
declare @qry VARCHAR(8000)
SET @qry='select distinct LE.id_estudio,LE.estudio from cat_AdminLab AL
inner join cat_lab_estudio LE on(AL.id_lab_Estudio=LE.id_estudio)
inner join cat_laboratorio LAB on(AL.id_lab_tipoLab=LAB.nPerfil)
Where id_laboratorio='+@param

exec (@qry)	
END
GO

